#include<bits/stdc++.h>
#define ONLINE_JUDGE
#define ll long long
#define ull unsigned long long
using namespace std;

const int N = 2e5 + 10, INF = 0x3f3f3f3f;

int n;
int a[N];

void solve()
{
    cin >> n;
    for (int i = 1;i <= n;i++) cin >> a[i];
    sort(a + 2, a + n);

    int ans = 0, p = 1;
    while (2 * a[p] < a[n]) {

        int t = a[p] * 2, x = p;
        while (t >= a[x + 1] && x < n) x++;
        if (x == p) { cout << -1 << '\n'; return; }

        p = x; ans++;
    }
    cout << ans + 2 << '\n';
}

signed main()
{
    // ios::sync_with_stdio(0);
    // cin.tie(0);cout.tie(0);
#ifndef ONLINE_JUDGE
    std::istringstream in(R"(10
298077099 766294630 440423914 59187620 725560241 585990757 965580536 623321126 550925214 917827435)");
    std::cin.rdbuf(in.rdbuf());
#endif
    int T = 1;
    cin >> T;
    for (int i = 1;i <= T;i++) {
        solve();
    }
}